package com.example.administrator.systemfailreport.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

import com.example.administrator.systemfailreport.R;

public class LoginActivity extends Activity implements View.OnClickListener {

    private EditText pswEt;
    private EditText userEt;
    private Button loginBt;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login);
        initView();
    }

    private void initView() {
       pswEt=(EditText)findViewById(R.id.pwdEt);
       userEt=(EditText)findViewById(R.id.accountEt);
       loginBt=(Button)findViewById(R.id.subBtn);
        loginBt.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        int action=v.getId();
        switch (action){
            case R.id.subBtn:
               /* if (TextUtils.isEmpty(pswEt.getText())||TextUtils.isEmpty(userEt.getText())){

                }*/
                System.out.print("点击了");
                Intent intent = new Intent(LoginActivity.this,MainActivity.class);
                startActivity(intent);

                break;
        }


    }
}
